home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / util / moni / Scout-src.lha / netinclude / clib / socket_protos.h < prev    next >
C/C++ Source or Header  |  2002-09-16  |  3KB  |  101 lines

  1. #ifndef CLIB_SOCKET_PROTOS_H
  2. #define CLIB_SOCKET_PROTOS_H \
  3.        "$Id: socket_protos.h,v 1.1.1.1 2001/11/26 22:21:15 tboeckel Exp $"
  4. /*
  5.  *      Prototypes of AmiTCP/IP bsdsocket.library
  6.  * 
  7.  *      Copyright © 1994 AmiTCP/IP Group,
  8.  *                       Network Solutions Development, Inc.
  9.  *                       All rights reserved.
  10.  */
  11.  
  12. #ifndef EXEC_TYPES_H
  13. #include <exec/types.h>
  14. #endif
  15.  
  16. #ifndef SYS_TYPES_H
  17. #include <sys/types.h>
  18. #endif
  19.  
  20. #ifndef SYS_TIME_H
  21. #include <sys/time.h>
  22. #endif
  23.  
  24. #ifndef SYS_SOCKET_H
  25. #include <sys/socket.h>
  26. #endif
  27.  
  28. #ifndef NETINET_IN_H
  29. #include <netinet/in.h>
  30. #endif
  31.  
  32.  
  33. LONG socket(LONG domain, LONG type, LONG protocol);
  34. LONG bind(LONG s, const struct sockaddr *name, LONG namelen);
  35. LONG listen(LONG s, LONG backlog);
  36. LONG accept(LONG s, struct sockaddr *addr, LONG *addrlen);
  37. LONG connect(LONG s, const struct sockaddr *name, LONG namelen);
  38. LONG send(LONG s, const UBYTE *msg, LONG len, LONG flags);
  39. LONG sendto(LONG s, const UBYTE *msg, LONG len, LONG flags, 
  40.           const struct sockaddr *to, LONG tolen);
  41. LONG sendmsg(LONG s, struct msghdr * msg, LONG flags);
  42. LONG recv(LONG s, UBYTE *buf, LONG len, LONG flags);    /* V3 */
  43. LONG recvfrom(LONG s, UBYTE *buf, LONG len, LONG flags, 
  44.             struct sockaddr *from, LONG *fromlen);
  45. LONG recvmsg(LONG s, struct msghdr * msg, LONG flags);    /* V3 */
  46. LONG shutdown(LONG s, LONG how);
  47. LONG setsockopt(LONG s, LONG level, LONG optname, 
  48.              const void *optval, LONG optlen);
  49. LONG getsockopt(LONG s, LONG level, LONG optname, 
  50.              void *optval, LONG *optlen);
  51. LONG getsockname(LONG s, struct sockaddr *name, LONG *namelen);
  52. LONG getpeername(LONG s, struct sockaddr *name, LONG *namelen);
  53.  
  54. LONG IoctlSocket(LONG d, ULONG request, char *argp);
  55. LONG CloseSocket(LONG d);
  56. LONG WaitSelect(LONG nfds, fd_set *readfds, fd_set *writefds, fd_set *exeptfds,
  57.         struct timeval *timeout, ULONG *maskp);
  58.  
  59. LONG Dup2Socket(LONG fd1, LONG fd2);               /* V2 */
  60.  
  61. LONG getdtablesize(void);                   /* V3 */
  62. void SetSocketSignals(ULONG SIGINTR, ULONG SIGIO, ULONG SIGURG);
  63. LONG SetErrnoPtr(void *errno_p, LONG size);
  64. LONG SocketBaseTagList(struct TagItem *tagList);    /* V3 */
  65. LONG SocketBaseTags(LONG tag, ...);            /* V3 */
  66.  
  67. LONG GetSocketEvents(ULONG *eventmaskp);        /* V4 */
  68.  
  69. LONG Errno(void);
  70.  
  71. LONG gethostname(STRPTR hostname, LONG size);          /* V3 */
  72. ULONG gethostid(void);                       /* V3 */
  73.  
  74. LONG ObtainSocket(LONG id, LONG domain, LONG type, LONG protocol);
  75. LONG ReleaseSocket(LONG fd, LONG id);
  76. LONG ReleaseCopyOfSocket(LONG fd, LONG id);
  77.  
  78. /* Arpa/inet functions */
  79. ULONG inet_addr(const UBYTE *);
  80. ULONG inet_network(const UBYTE *);
  81. char *Inet_NtoA(ULONG s_addr);
  82. ULONG Inet_MakeAddr(ULONG net, ULONG lna);
  83. ULONG Inet_LnaOf(LONG s_addr);
  84. ULONG Inet_NetOf(LONG s_addr);
  85.  
  86. /* NetDB functions */
  87. struct hostent  *gethostbyname(const UBYTE *name);
  88. struct hostent  *gethostbyaddr(const UBYTE *addr, LONG len, LONG type);
  89. struct netent   *getnetbyname(const UBYTE *name);
  90. struct netent   *getnetbyaddr(LONG net, LONG type);
  91. struct servent  *getservbyname(const UBYTE *name, const UBYTE *proto);
  92. struct servent  *getservbyport(LONG port, const UBYTE *proto);
  93. struct protoent *getprotobyname(const UBYTE *name);
  94. struct protoent *getprotobynumber(LONG proto);
  95.  
  96. /* Syslog functions */
  97. void vsyslog(ULONG pri, const char *fmt, LONG *);
  98. void syslog(ULONG pri, const char *fmt, ...);
  99.  
  100. #endif /* !CLIB_SOCKET_PROTOS_H */
  101.